package com.dynamic.data.source;

import com.dynamic.data.source.service.InitService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
 * 开发公司：联信
 * 版权：联信
 * <p>
 * Annotation
 *
 * @author 刘志强
 * @created Create Time: 2021/1/22
 */
@SpringBootApplication
@Slf4j
public class Application implements CommandLineRunner {

    @Autowired
    private InitService initService;

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }


    @Override
    public void run(String... args) {
        initService.initDataSource();
        log.info("服务已经起动");
    }
}
